package com.chandra.pos.order.dao;


import com.chandra.pos.order.dao.entity.Order;
import com.chandra.pos.order.model.OrderStatus;
import com.chandra.pos.order.model.ShippingStatus;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.util.List;

/**
 * 
 * Order DAO Interface
 * 
 * @author onlinetechvision.com
 * @since 25 Mar 2012
 * @version 1.0.0
 *
 */

public interface IOrderDAO {

	/**
	 * Add Order
	 * 
	 * @param  Order order
	 */
	public void addOrder(Order order);
	
	/**
	 * Update Order
	 * 
	 * @param  Order order
	 */
	public void updateOrder(Order order);
	
	/**
	 * Delete Order
	 * 
	 * @param  Order order
	 */
	public void deleteOrder(Order order);
	
	/**
	 * Get Order
	 * 
	 * @param  int Order Id
	 */
	public Order getOrderById(Long id);
	
	/**
	 * Get Order List
	 * 
	 */
	public Page getOrders(PageRequest posPagination);

    public List<Order> searchOrders(String query);


    public boolean updateOrderStatus(Long orderId,OrderStatus status);

    public boolean updateShippingStatus(Long orderId,ShippingStatus status);
}
